﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Abstract_Factory
{
    class Program
    {
        static void Main(string[] args)
        {
            ICarFactory expensiveCarFactory = new ExpensiveCarFactory();
            ICarFactory cheapCarFactory = new CheapCarFactory();

            Car cheapCar = new Car();
            cheapCar.Engine = cheapCarFactory.CreateEngine();
            cheapCar.Wheels = cheapCarFactory.CreateWheels();

            Car mediumCar = new Car();
            mediumCar.Engine = expensiveCarFactory.CreateEngine();
            mediumCar.Wheels = cheapCarFactory.CreateWheels();

            Car expensiveCar = new Car();
            expensiveCar.Engine = expensiveCarFactory.CreateEngine();
            expensiveCar.Wheels = expensiveCarFactory.CreateWheels();

            cheapCar.Print();
            mediumCar.Print();
            expensiveCar.Print();
        }
    }
}
